<?php $archive=new Zmsun\Copen\DataPackageArchive($this->serviceManager,new Zmsun\Copen\OpenLib($this->serviceManager->get("Database"),$this->serviceManager->get("DBTablePrefix")));$assetsUri=$this->assetsUri();$currPageUrl=parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);$ZGHEAD=<<<S
<link rel="stylesheet" type="text/css" href="{$assetsUri}/css/default.css">
<script src="/i/d/js/zmsun/zmsunupload.js"></script>
<script type="text/javascript" src="{$assetsUri}/js/default.js"></script>
S;
$contentStr=$pagerStr=$pagerItemStr='';$files=$archive->getList();$paginator=$this->helper("Paginator");$paginator->setPageSize(10)->setPagerSize(5)->setTotals(count($files))->setCurrentPageNum($_GET['page']?? 1)->setNextTxt("")->setPrevTxt("");$offset=$paginator->currentPageOffset();$trans=['enterpr'=>'企业版'];foreach(array_slice($files,$offset['begin'],$offset['length'])as$packageInfo){if(array_key_exists($packageInfo['site_edition'],$trans)){$version=$trans[$packageInfo['site_edition']];}else{$version='Unknown';}$contentStr.=<<<S
<tr class="item-info" data-file-name="{$packageInfo['filename']}">
	<td class="title">
		<div class="title-wrapper">
			<b class="item-checkbox J_TItemCheckbox"></b>
			<p class="title-text">{$packageInfo['name']}</p>
		</div>
	</td>
	<td class="g_filename"><span>{$packageInfo['filename']}</span></td>
	<td class="ellipsis"><span>{$packageInfo['sdk_version']}</span></td>
	<td class="author ellipsis"><a>{$version}</a></td>
	<td class="ellipsis g_tel"><span>{$packageInfo['create_datetime']}</span></td>
	<td class="ellipsis g_mail"><span>{$packageInfo['filesize']}</span></td>
	<td class="opt">
		<a class="J_TItemDel">删除</a>
		<a class="J_TItemInstall">应用到站点</a>
		<a class="J_TItemDownload" href="{$packageInfo['download_addr']}" target="_blank">下载</a>
	</td>
</tr>
S;
}if(!$contentStr)$contentStr='<tr class="item-info"><td colspan="8">没有记录</td></tr>';?> <div id="zmsun_sidebar"><div class="wrapper"><div class="sidebarTit"><h2>数据包管理</h2></div><div class="sidebarBox" data-widget-zmsunscrollbar><div class="sidebarAccordion"><div class="accordionTit itemActive"><h4><a><span>数据包</span></a></h4></div></div></div></div><div class="switch"><p><i></i></p></div></div><div id="zmsun_main"><div id="zmsun_toolbar"><div class="item-funcs item-funcs1"><ul class="item-opts"><li class="createPackageTrigBtn"><a>创建数据包</a></li><li class="uploadPackageTrigBtn"><a>上传数据包</a></li></ul><div class="upBox"></div></div></div><div id="zmsun_a_content"><div class="item-funcs item-funcs2"><ul class="item-opts"><li class="check-all-items"><em class="check-all-box"></em><span class="check-all-text">全选</span></li><li class="J_TBatchDelTrigBtn"><a class="J_TGoldData">批量删除</a></li></ul></div><table class="productHead"><caption class="hidden">数据包列表</caption><colgroup><col width="14%"><col width="13%"><col width="8%"><col width="10%"><col width="13%"><col width="10%"><col width="auto"></colgroup><thead class="items-tb-hd"><tr><th class="col-title" scope="col">名称</th><th class="col-title" scope="col">文件</th><th class="col-cat-edit" scope="col">SDK版本</th><th class="col-price" scope="col"><div class="price-wrap"><span class="from-label">网站版本</span></div></th><th class="col-price" scope="col"><div class="price-wrap"><span class="from-label">创建时间</span></div></th><th class="col-price" scope="col"><div class="price-wrap"><span class="from-label">大小</span></div></th><th class="col-opt">操作</th></tr></thead><tbody></tbody></table><div class="table-outer"><div class="ks-container"><div class="table-inner ks-body"><table class="items-table"><colgroup><col width="14%"><col width="13%"><col width="8%"><col width="10%"><col width="13%"><col width="10%"><col width="auto"></colgroup><tbody class="item-list"><?=$contentStr ?></tbody></table></div></div><div class="pagination"><?php echo$paginator->html()?></div></div></div><div class="createPackageDialog hidden"><div class="opttip"><div class="zmsun_fieldItem"><label class="itemName">名称</label><div class="subItems"><input type="text" name="package_name" maxlength="50"><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">可选，数据包名称，最多50个字符。</span></div></div></div><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div><div class="backupProgress hidden"><div class="waitingbar"></div><p class="waitTip"><em></em>正在创建，完成后自动关闭此提示窗口！</p></div></div><div class="singleDelPackageDialog hidden"><div class="opttip"><p>删除不可恢复，确定删除?</p><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div></div><div class="batchDelPackageDialog hidden"><div class="opttip"><p>删除不可恢复，确定删除?</p><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div></div><div class="applyPackageDialog hidden"><div class="opttip"><p>操作不可撤销，应用数据包到站点？</p><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div><div class="backupProgress hidden"><div class="waitingbar"></div><p class="waitTip"><em></em>正在应用，完成后自动关闭此提示窗口！</p></div></div></div>